package com.forever7776.qiniu.core.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 文件系统表
 * </p>
 *
 * @author kz
 * @since 2018-01-18
 */
@TableName("sys_file")
public class SysFile extends Model<SysFile> {

    private static final long serialVersionUID = 1L;

	@TableId(value="id", type= IdType.AUTO)
	private Integer id;
    /**
     * 用户ID
     */
	@TableField("user_id")
	private String userId;
    /**
     * 文件名称
     */
	@TableField("file_name")
	private String fileName;
    /**
     * 大小
     */
	@TableField("file_size")
	private long fileSize;
    /**
     * 七牛KEY名
     */
	@TableField("file_key")
	private String fileKey;
    /**
     * 后缀
     */
	@TableField("file_suffix")
	private String fileSuffix;
    /**
     * 1:图片 2:视频
     */
	@TableField("file_type")
	private Integer fileType;
    /**
     * 路径
     */
	@TableField("file_path")
	private String filePath;
    /**
     * 微信素材ID
     */
	@TableField("media_id")
	private String mediaId;
    /**
     * 文件上传成功状态（成功：0 失败 ：-1）
     */
	@TableField("file_status")
	private Integer fileStatus;
    /**
     * 文件插入时间
     */
	@TableField("insert_date")
	private Date insertDate;


	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getFileName() {
		return fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	public long getFileSize() {
		return fileSize;
	}

	public void setFileSize(long fileSize) {
		this.fileSize = fileSize;
	}

	public String getFileKey() {
		return fileKey;
	}

	public void setFileKey(String fileKey) {
		this.fileKey = fileKey;
	}

	public String getFileSuffix() {
		return fileSuffix;
	}

	public void setFileSuffix(String fileSuffix) {
		this.fileSuffix = fileSuffix;
	}

	public Integer getFileType() {
		return fileType;
	}

	public void setFileType(Integer fileType) {
		this.fileType = fileType;
	}

	public String getFilePath() {
		return filePath;
	}

	public void setFilePath(String filePath) {
		this.filePath = filePath;
	}

	public String getMediaId() {
		return mediaId;
	}

	public void setMediaId(String mediaId) {
		this.mediaId = mediaId;
	}

	public Integer getFileStatus() {
		return fileStatus;
	}

	public void setFileStatus(Integer fileStatus) {
		this.fileStatus = fileStatus;
	}

	public Date getInsertDate() {
		return insertDate;
	}

	public void setInsertDate(Date insertDate) {
		this.insertDate = insertDate;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "SysFile{" +
			", id=" + id +
			", userId=" + userId +
			", fileName=" + fileName +
			", fileSize=" + fileSize +
			", fileKey=" + fileKey +
			", fileSuffix=" + fileSuffix +
			", fileType=" + fileType +
			", filePath=" + filePath +
			", mediaId=" + mediaId +
			", fileStatus=" + fileStatus +
			", insertDate=" + insertDate +
			"}";
	}
}
